Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@greymass/keycert
Advanced tools
Anchor key certificate encoding and decoding library for JavaScript.
The @greymass/keycert
package is distributed as a module on npm.
yarn add @greymass/keycert
# or
npm install --save @greymass/keycert
import {generate, decrypt} from '@greymass/keycert'
generate({
privateKey: '5KYnSy2U9y8Ua1AbWYDQxuEa6Smc9WPtBNsQ6TZRPsZBqFB3AqS',
account: {actor: 'foobar', permission: 'owner'},
chainId: '2a02a0053e5a8cf73a56ba0fda11e4d92e0238a4a2aa74fccf46d5a910746840',
}).then(({cert, encryptionWords}) => {
console.log(String(cert)) // anchorcert:KgKgBT5ajPc6VroP2hHk2S4COKSiqnT8z0bVqRB0aEAAAAAAXHMoXQAAAACAqyanACTh3X6hzLZx-dGsO0swCpi2WDg_Xd8mSK-C2kY_gygHpHe8jNk
console.log(encryptionWords) // [ 'number', 'arrow', 'twenty', 'permit', 'much', 'caution' ]
})
decrypt(
'anchorcert:KgKgBT5ajPc6VroP2hHk2S4COKSiqnT8z0bVqRB0aEAAAAAAXHMoXQAAAACAqyanACTh3X6hzLZx-dGsO0swCpi2WDg_Xd8mSK-C2kY_gygHpHe8jNk',
['number', 'arrow', 'twenty', 'permit', 'much', 'caution']
).then(({chainId, account, privateKey}) => {
console.log(String(chainId)) // 2a02a0053e5a8cf73a56ba0fda11e4d92e0238a4a2aa74fccf46d5a910746840
console.log(JSON.stringify(account)) // {"actor": "foobar", "permission": "owner"}
console.log(privateKey.toWif()) // 5KYnSy2U9y8Ua1AbWYDQxuEa6Smc9WPtBNsQ6TZRPsZBqFB3AqS
})
You need Make, node.js and yarn installed.
Clone the repository and run make
to checkout all dependencies and build the project. See the Makefile for other useful targets. Before submitting a pull request make sure to run make lint
.
Made with ☕️ & ❤️ by Greymass, if you find this useful please consider supporting us.
FAQs
Anchor key certificate encoding and decoding library
We found that @greymass/keycert demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.